//
//  MessageControl.m
//  FreeTime
//
//  Created by  on 16/8/25.
//  Copyright © 2016年 SRDZ.com. All rights reserved.
//

#import "MessageControl.h"
#import "HomeTownControl.h"
#import "LoginControl.h"
#import "FriendsControl.h"
#import "Header.h"
@interface MessageControl ()

@end

@implementation MessageControl

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
//    for (int i = 0; i<4; i++) {
//        UIButton * Btn1 = [UIButton buttonWithType:UIButtonTypeCustom];
//        Btn1.frame = CGRectMake(0, 150+i*50, 80, 40);
//        Btn1.backgroundColor = [UIColor purpleColor];
//        Btn1.tag = 100+i;
//        [Btn1 addTarget:self action:@selector(heart:) forControlEvents:UIControlEventTouchUpInside];
//        [self.view addSubview:Btn1];
//    }

}
#pragma mark -- myStyle --
- (void)setupUI{
    UIButton * friendBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    friendBtn.frame = CGRectMake(0, 0,WindowWidth, 55);
    [friendBtn addTarget:self action:@selector(pushFriendCircle) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:friendBtn];
    
    UIImageView * friendImgV = [ReduceCode creatImageVeiwWithFrame:CGRectMake(10, 15, 25, 25) imageName:@"friendCircle" isCorner:NO];
    [friendBtn addSubview:friendImgV];
    UILabel * titleLbl = [ReduceCode creatLabelWithFrame:CGRectMake(CGRectGetMaxX(friendImgV.frame)+10, 20, 60, 15) title:@"朋友圈" titleColor:[ImageUtil colorWithRgb:0x666666] font:15 textAlignment:0];
    [friendBtn addSubview:titleLbl];
    UIImageView * arrowImgV = [ReduceCode creatImageVeiwWithFrame:CGRectMake(WindowWidth-30, 20, 20, 20) imageName:@"arrowF" isCorner:NO];
    [friendBtn addSubview:arrowImgV];
    [ToolUtil createLine:54 superView:friendBtn lift:10 width:WindowWidth-20 hight:1 color:[ImageUtil colorWithRgb:0xe6e6e6]];
}
#pragma mark -- button响应事件 --
- (void)pushFriendCircle{
    FriendsControl * friendVC = [FriendsControl new];
    friendVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:friendVC animated:YES];
}
//- (void)heart:(UIButton *)btn{
//    if (btn.tag == 100) {
//        HomeTownControl * townVC = [HomeTownControl new];
//        townVC.hidesBottomBarWhenPushed = YES;
//        [self.navigationController pushViewController:townVC animated:YES];
//    }else if (btn.tag==101){
//        LoginControl * townVC = [LoginControl new];
//        townVC.hidesBottomBarWhenPushed = YES;
//        [self.navigationController pushViewController:townVC animated:YES];
//    }else if (btn.tag == 102){
//        FriendsControl * townVC = [FriendsControl new];
//        townVC.hidesBottomBarWhenPushed = YES;
//        [self.navigationController pushViewController:townVC animated:YES];
//    }else if (btn.tag == 103){
//        
//    }
//}


@end
